<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ page import="java.util.*,com.visualexpress.domain.*,com.visualexpress.enterprise.efficiency.*,com.visualexpress.predict.*"%>
    <%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
 <base href="<%=basePath%>">

<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAbbq5lngDDM8E8FxIE-ZtQRTEQ0m-aBpX9CWjtR9q1QD8EjThJRROdRV1WoPYzfNJ1gzLnzIoRgej0w" type="text/javascript"></script>   
	  	<script type='text/javascript' src='dwr/engine.js'></script>
	  	<script type='text/javascript' src='dwr/util.js'></script>	 
	  	<script type='text/javascript' src='dwr/interface/GetMapMarks.js'></script>
	  	<script type='text/javascript' src='js/GetMapMarks.js'></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>显示工作效率</title>
</head>
<body onload="getGMapMarks()" onunload="GUnload()">

		<% User user =  (User)session.getAttribute("user");
		
	 %>
<div style="width: 100%; height: 18px">
			<table align="right">
				<tr>
					<td>
						<strong><em><%=user.getUsername() %></em></strong>&nbsp;|
					</td>
					<td>
						<a href="jsp/enterprise/selfInfo.jsp" title="selfInfo">个人信息</a>&nbsp;|
					</td>
					<td>
						<a href="jsp/enterprise/changePassword.jsp" title="changePassword">修改密码</a>&nbsp;|
					</td>
					<td>
						<a href="quit.action" title="quit">注销</a>
					</td>
				</tr>
			</table>
		</div>


		<div align="center" style="width: 100%; height: 40%">
		
	 <img border="0" src="picture/logo.jpg"/>
	    <div id="map"  style="width:900px; height:700px"></div>
	     <tr>
	<td> 高效：<img border="0" src="images/grn-pushpin.png">
	</td>
	<td> 中效：<img border="0" src="images/ylw-pushpin.png">
	</td>
	<td> 低效：<img border="0" src="images/red-pushpin.png">
	</td>
	</tr>
	 <table  align="center" border="1" cellpadding="5" cellspacing="0" width="50% id="ConTable">
	 
        <tr>
          <td align="center" bgcolor="#C0C0C0" width="4%">序号</td>
          <td align="center" bgcolor="#C0C0C0" width="10%">城市</td>
          <td align="center" bgcolor="#C0C0C0" width="%10%">工作效率</td>
          <td align="center" bgcolor="#C0C0C0" width="10%">平均停留时间</td>
           <td align="center" bgcolor="#C0C0C0" width="4%">排名</td>
        </tr>
        <% 
        List<CityEfficiency> ceList = (List<CityEfficiency>)session.getAttribute("ceList");
		 if(ceList!=null)
		 {
		 	for (int i=0;i<ceList.size();i++)
		 	{
	   %>
        <tr>
          <%
          	String level ="";
                    if(ceList.get(i).getEfficiencyLever()==EfficiencyLevel.HIGH)
                    		level="高效";
                    else if(ceList.get(i).getEfficiencyLever()==EfficiencyLevel.MEDIUM)
                    	  level="中效";
                   else if(ceList.get(i).getEfficiencyLever()==EfficiencyLevel.LOW)
                    	  level="低效";
                    else 
                    	level="出错";
          %>
          		 
          <td align="center" bgcolor="#C0C0C0" width="4%"><%=i+1%></td>
          <td align="left" width="10%"><%=ceList.get(i).getLocation().getName()%></td>
          
          <td align="left" width="10%"><%=level %> </td>
          <%String time;
           if(ceList.get(i).getSettleHour()==Double.MAX_VALUE)
           		time = "信息缺失";
           	else 
           	time = ceList.get(i).getSettleHourString(); %>
          <td align="left" width="10%"><%=time %> </td>
          <td align="left" width="4%"><%=ceList.get(i).getRank() %> </metd>
        </tr>
        <%}} %>
      </table>
   
      
      </div>
</body>
</html>